﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo02
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入你要选择的方法：1.圆形、2.正方形");
            int a = int.Parse(Console.ReadLine());
                    Console.WriteLine("请输入半径或边长：");
                    int radius = int.Parse(Console.ReadLine());
            Shape s;
            switch (a)
            {
                case 1:
                    Circle c = new Circle();
                    c.GetArea(radius);
                    s = new Circle();
                    break;
                case 2:
                    Square S = new Square();
                    S.GetArea(radius);
                    s = new Square();
                    break;
                default:
                    Console.WriteLine("请输入正确的数字");
                    s = new Circle();
                    break;
            }
            Test(s);
        }
        public static void Test(Shape s)
        {
            s.GetHashCode();
        }
    }
}
